package io.github.iogogogo.scheduled.service;

import io.github.iogogogo.scheduled.model.XxlJobInfo;

import java.util.List;

/**
 * xxl-job 任务操作
 * <p>
 * Created by tao.zeng on 2024/11/19.
 */
public interface JobInfoService {

    /**
     * 获取任务信息
     *
     * @param jobGroupId      执行器ID
     * @param executorHandler 执行Handler
     */
    List<XxlJobInfo> getJobInfo(Integer jobGroupId, String executorHandler);

    /**
     * 添加任务
     *
     * @param xxlJobInfo 任务信息
     */
    Integer addJobInfo(XxlJobInfo xxlJobInfo);


    /**
     * 更新任务
     *
     * @param xxlJobInfo 任务信息
     */
    Boolean updateJobInfo(XxlJobInfo xxlJobInfo);
}
